<template>
  <div id="pdfHtml" class="export-page" style="position: absolute;left:-220%;width:1300px;padding: 50px;">
    <!-- <div class="export-page" id="pdfHtml" style="width:1300px;padding: 50px;"> -->
    <div class="item-excel">
      <div style="width:100%;text-align:center;font-size:32px;color:#111;font-weight: 600;">医疗新技术项目申报表</div>
      <div class="export-header clearfix flex flex-row align-center">
        <div class="line" />
        <span class="font25 ml10 flex-auto">项目基本信息</span>
      </div>
      <div class="table-content item">
        <el-descriptions class="margin-top" :column="4" border>
          <el-descriptions-item :span="4" :content-style="contentStyle" :label-style="labelStyle">
            <template slot="label">
              项目名称
            </template>
            {{ dataModel.project_name }}
          </el-descriptions-item>
          <el-descriptions-item :span="2" :content-style="contentStyle" :label-style="labelStyle">
            <template slot="label">
              项目类型
            </template>
            {{ dataModel.project_classify }}
          </el-descriptions-item>
          <el-descriptions-item v-if="dataModel.project_classify == '手术类'" :span="2" :content-style="contentStyle" :label-style="labelStyle">
            <template slot="label">
              手术级别
            </template>
            {{ dataModel.ss_level }}
          </el-descriptions-item>
          <el-descriptions-item :span="2" :content-style="contentStyle" :label-style="labelStyle">
            <template slot="label">
              项目水平
            </template>
            {{ dataModel.project_advanced }}
          </el-descriptions-item>
          <el-descriptions-item :span="2" :content-style="contentStyle" :label-style="labelStyle">
            <template slot="label">
              技术类别
            </template>
            {{ dataModel.tech_type }}
          </el-descriptions-item>
          <el-descriptions-item :span="2" :content-style="contentStyle" :label-style="labelStyle">
            <template slot="label">
              项目编号
            </template>
            {{ dataModel.projectNo }}
          </el-descriptions-item>
          <el-descriptions-item :span="2" :content-style="contentStyle" :label-style="labelStyle">
            <template slot="label">
              院区
            </template>
            {{ dataModel.hospital }}
          </el-descriptions-item>
          <el-descriptions-item :span="2" :content-style="contentStyle" :label-style="labelStyle">
            <template slot="label">
              申请科室
            </template>
            {{ deptMap[dataModel.apply_dept] }}
          </el-descriptions-item>
          <el-descriptions-item :span="2" :content-style="contentStyle" :label-style="labelStyle">
            <template slot="label">
              项目负责人
            </template>
            {{ dataModel.project_leader }}
          </el-descriptions-item>
          <el-descriptions-item :span="2" :content-style="contentStyle" :label-style="labelStyle">
            <template slot="label">
              工号
            </template>
            {{ dataModel.work_no }}
          </el-descriptions-item>
          <el-descriptions-item :span="2" :content-style="contentStyle" :label-style="labelStyle">
            <template slot="label">
              性别
            </template>
            {{ dataModel.sex }}
          </el-descriptions-item>
          <el-descriptions-item :span="2" :content-style="contentStyle" :label-style="labelStyle">
            <template slot="label">
              出生年月
            </template>
            {{ dataModel.birthday }}
          </el-descriptions-item>
          <el-descriptions-item :span="2" :content-style="contentStyle" :label-style="labelStyle">
            <template slot="label">
              学历
            </template>
            {{ dataModel.xueli }}
          </el-descriptions-item>
          <el-descriptions-item :span="2" :content-style="contentStyle" :label-style="labelStyle">
            <template slot="label">
              学位
            </template>
            {{ dataModel.xuewei }}
          </el-descriptions-item>
          <el-descriptions-item :span="2" :content-style="contentStyle" :label-style="labelStyle">
            <template slot="label">
              毕业学校
            </template>
            {{ dataModel.school }}
          </el-descriptions-item>
          <el-descriptions-item :span="2" :content-style="contentStyle" :label-style="labelStyle">
            <template slot="label">
              专业技术职称
            </template>
            {{ dataModel.zhicheng }}
          </el-descriptions-item>
          <el-descriptions-item :span="2" :content-style="contentStyle" :label-style="labelStyle">
            <template slot="label">
              项目开始时间
            </template>
            {{ dataModel.project_start_time }}
          </el-descriptions-item>
          <el-descriptions-item :span="2" :content-style="contentStyle" :label-style="labelStyle">
            <template slot="label">
              预计开展例数
            </template>
            {{ dataModel.kzlishu }}
          </el-descriptions-item>
        </el-descriptions>
      </div>
    </div>
    <div class="item-excel">
      <div class="export-header clearfix flex flex-row align-center mt20 item">
        <div class="line" />
        <span class="font25 ml10 flex-auto">项目团队信息</span>
      </div>
      <div class="table-content item">
        <el-descriptions class="margin-top" :column="4" border>
          <el-descriptions-item :span="4" :content-style="contentStyle" :label-style="labelStyle">
            <template slot="label">
              是否多个科室合作开展
            </template>
            {{ dataModel.team_sfdgks }}
          </el-descriptions-item>
          <el-descriptions-item :span="2" :content-style="contentStyle" :label-style="labelStyle">
            <template slot="label">
              主导科室
            </template>
            {{ deptMap[dataModel.team_zdks] }}
          </el-descriptions-item>
          <el-descriptions-item :span="2" :content-style="contentStyle" :label-style="labelStyle">
            <template slot="label">
              科室负责人
            </template>
            {{ userMap[dataModel.team_zdksr] }}
          </el-descriptions-item>
        </el-descriptions>
        <el-table v-if="dataModel.subform_1693966431000_71847 && dataModel.subform_1693966431000_71847.length > 0 && dataModel.subform_1693966431000_71847[0].team_cyks" ref="teamTable" border tooltip-effect="dark" class="mt10" :data="dataModel.subform_1693966431000_71847" :header-cell-style="{backgroundColor:'#fafafa !important',fontSize:'20px !important'}">
          <el-table-column label="参与科室" prop="team_cyks" align="center" width="400">
            <template slot-scope="scope">
              <span style="color:#215195">{{ deptMap[scope.row.team_cyks] }}</span>
            </template>
          </el-table-column>
          <el-table-column label="科室负责人" prop="team_cyksr" align="center" width="400">
            <template slot-scope="scope">
              <span style="color:#215195">{{ userMap[scope.row.team_cyksr] }}</span>
            </template>
          </el-table-column>
        </el-table>
        <div class="mt30 font20 ml10">团队名单：</div>
        <el-table v-if="dataModel.subform_1693968059000_69295 && dataModel.subform_1693968059000_69295.length > 0" ref="teamTable" border tooltip-effect="dark" class="mt10" :data="dataModel.subform_1693968059000_69295" :header-cell-style="{backgroundColor:'#fafafa !important',fontSize:'20px !important'}">
          <el-table-column label="姓名" prop="team_md_name" align="center" width="130" />
          <el-table-column label="性别" prop="team_md_sex" align="center" width="110" />
          <el-table-column label="年龄" prop="team_md_age" align="center" width="110" />
          <el-table-column label="职称" prop="team_md_zc" align="center" width="190" />
          <el-table-column label="所在科室" prop="team_md_ks" align="center" width="257" />
          <el-table-column label="承担的主要任务" prop="team_md_zyrw" align="center" width="400" />
        </el-table>
      </div>
    </div>
    <div class="item-excel">
      <div class="export-header clearfix flex flex-row align-center mt20">
        <div class="line" />
        <span class="font25 ml10 flex-auto">项目收费编码</span>
      </div>
      <el-table v-if="dataModel.subform_1694163677000_32957 && dataModel.subform_1694163677000_32957.length > 0" ref="teamTable" border tooltip-effect="dark" class="item" :data="dataModel.subform_1694163677000_32957" :header-cell-style="{backgroundColor:'#fafafa !important',fontSize:'20px !important'}">
        <el-table-column label="收费项目编码" prop="sfbm_bm" align="center" width="210" />
        <el-table-column label="收费项目名称" prop="sfbm_xmmc" align="center" width="250" />
        <el-table-column label="项目价格" prop="sfbm_price" align="center" width="120" />
        <el-table-column label="计价单位" prop="sfbm_unit" align="center" width="120" />
        <el-table-column label="项目内涵" prop="sfbm_content" align="center" width="495" />
      </el-table>
    </div>
    <div class="item-excel">
      <div class="export-header clearfix flex flex-row align-center" style="margin-top:50px">
        <div class="line" />
        <span class="font25 ml10 flex-auto">项目详细情况</span>
      </div>
    </div>
    <div class="item-excel">
      <div class="font22 mt20" style="color: #333;">申报项目的适应症</div>
      <div class="mt10 font20 main-color line-height-32"> {{ dataModel.xxqk_syz }}</div>
    </div>
    <div class="item-excel">
      <div class="font22 mt20" style="color: #333;">申报项目的理论依据及基础工作</div>
      <div class="mt10 font20 main-color line-height-32"> {{ dataModel.xxqk_jcgz }}</div>
    </div>
    <div class="item-excel">
      <div class="font22 mt20" style="color: #333;">申报项目的国内外现状</div>
      <div class="mt10 font20 main-color line-height-32"> {{ dataModel.xxqk_gnwqk }}</div>
    </div>
    <div class="item-excel">
      <div class="font22 mt20" style="color: #333;">申报项目我院开展情况</div>
      <div class="mt10 font20 main-color line-height-32"> {{ dataModel.xxqk_kzqk }}</div>
    </div>
    <div class="item-excel">
      <div class="font22 mt20" style="color: #333;">项目的社会效益和经济效益</div>
      <div class="mt10 font20 main-color line-height-32"> {{ dataModel.xxqk_jjxy }}</div>
    </div>
    <div class="item-excel">
      <div class="font22 mt20" style="color: #333;">预计出成果时间</div>
      <div class="mt10 font20 main-color line-height-32"> {{ dataModel.xxqk_cgsj }}</div>
    </div>
    <div class="item-excel">
      <div class="font22 mt20" style="color: #333;">可能出现的困难及计划投入</div>
      <div class="mt10 font20 main-color line-height-32"> {{ dataModel.xxqk_jhtr }}</div>
    </div>
    <div class="item-excel">
      <div class="export-header clearfix flex flex-row align-center item" style="margin-top:50px">
        <div class="line" />
        <span class="font25 ml10 flex-auto">项目审批记录</span>
      </div>
      <el-table :data="circulationHistoryList" border style="width: 100%" stripe max-height="1500" :header-cell-style="{'text-align':'center'}">
        <el-table-column prop="id" label="#" align="center" type="index" width="70" />
        <el-table-column prop="state" label="审批节点" align="center">
          <template slot-scope="scope">
            <div class="font16">{{ scope.row.state }}</div>
          </template>
        </el-table-column>
        <el-table-column prop="processor" label="处理人" align="center" width="120">
          <template slot-scope="scope">
            <div class="font16">{{ scope.row.processor }}</div>
          </template>
        </el-table-column>
        <el-table-column prop="status" label="审批操作" align="center" width="120">
          <template slot-scope="scope">
            <div v-if="scope.row.status == 1" class="font16">
              审批通过
            </div>
            <div v-if="scope.row.status == 2" class="font16">
              提交成功
            </div>
            <div v-if="scope.row.status == 0" class="font16">
              审批驳回
            </div>
          </template>
        </el-table-column>
        <el-table-column prop="remarks" label="审批意见" align="center">
          <template slot-scope="scope">
            <div class="font16">{{ scope.row.remarks }}</div>
          </template>
        </el-table-column>
        <el-table-column prop="create_time" label="处理时间" align="center" width="180">
          <template slot-scope="scope">
            <div class="font16">{{ scope.row.create_time }}</div>
          </template>
        </el-table-column>
        <el-table-column prop="status" label="备注" width="270">
          <template slot-scope="scope">
            <div v-if="scope.row.other_data && (scope.row.state == '上海医学会审批' || scope.row.state == '上海卫监所审批' || scope.row.state == '上海临检中心审批')" class="font16">
              <div class="font16">材料送出时间:{{ scope.row.other_data.sendTime }}</div>
              <div class="font16">材料送达时间:{{ scope.row.other_data.arriveTime }}</div>
              <div class="font16">材料送达地址:{{ scope.row.other_data.address }}</div>
            </div>
            <div v-else class="primary-color font16" />
          </template>
        </el-table-column>
        <el-table-column prop="status" label="状态" align="center" width="90">
          <template slot-scope="scope">
            <div v-if="scope.row.status == 3" class="warning-color font16">
              待处理
            </div>
            <div v-else class="primary-color font16">
              已处理
            </div>
          </template>
        </el-table-column>
      </el-table>
    </div>
  </div>
</template>
<script>
export default {
  name: 'ExportPage',
  filters: {
    arrayString(val) {
      if (val && val.length > 0) {
        return val.join(',')
      } else {
        return ''
      }
    }
  },
  props: ['formData', 'deptMap', 'userMap', 'circulationHistoryList'],
  data() {
    return {
      dataModel: this.formData,
      contentStyle: {
        'text-align': 'left',
        'min-width': '130px',
        'font-size': '20px',
        'color': '#215195'
      },
      // label样式
      labelStyle: { 'width': '150px', 'font-size': '20px', 'color': '#333' },
      labelAreaStyle: { 'width': '310px', 'font-size': '20px', 'color': '#333' }
    }
  },

  computed: {

  },
  watch: {
    formData: {
      deep: true,
      handler(val) {
        this.dataModel = val
      }
    }
  },
  mounted() {

  }
}

</script>
<style lang="scss" scoped>
.export-header {
  background: #fff !important;
  padding: 8px 10px;
  height: 70px;
  line-height: 70px;

  .line {
    height: 32px;
    width: 5px;
    background: #277fd6;
  }
}

</style>
